package main

import "fmt"

func main() {
	intChan := make(chan int, 3)

	intChan <- 10
	num := 111
	intChan <- num

	//如果超过channel容量会报错
	intChan <- 1112
	//intChan <- 434
	fmt.Println(len(intChan), cap(intChan))

	//如果没有数据，再进行读取会报错
	num1 := <-intChan
	fmt.Println(num1)
}